package day20170420.student;

import java.util.ArrayList;
import java.util.List;
import org.junit.Test;

public class StudentTest {
	
	/**
	 * list测试
	 * @throws Exception
	 */
	@Test
	public void studentTest() throws Exception {
		//第一个学生
		Student stu1 = new Student();
		stu1.setName("小黄");
		stu1.setSex('男');
		stu1.setAge(20);
		
		//第二个学生
		Student stu2 = new Student();
		stu2.setName("小张");
		stu2.setSex('男');
		stu2.setAge(22);
		
		//第三个学生
		Student stu3 = new Student();
		stu3.setName("小丽");
		stu3.setSex('女');
		stu3.setAge(21);
		
		List<StudentDao> list = new ArrayList<StudentDao>();
		list.add(stu1);
		list.add(stu2);
		list.add(stu3);
		
		for(StudentDao student : list){
			System.out.println(student);
		}
	}
}
